import Vue from "vue"
/** 
 * 医师预约设置服务管理
 */
export default {
  /**
   * 添加预约设置
   *
   * @param {*} [params={}]
   * @param {*} config
   * @returns
   */
  async addAppointment(params = {}, config = {}) {
    let result = await Vue.http.post('/Appointment/AddAppointment', params, config);
    return result;
  },
  /**
   * 修改预约设置
   *
   * @param {*} [params={}]
   * @param {*} config
   * @returns
   */
  async updateAppointment(params = {}, config = {}) {
    let result = await Vue.http.put('/Appointment/UpdateAppointment', params, config);
    return result;
  },
  /**
   * 根据预约设置编号获取预约设置信息
   *
   * @param {*} [params={}]
   * @param {*} config
   * @returns
   */
  async getAppointmentByID(params = {}, config = {}) {
    config.params = params;
    let result = await Vue.http.get('/Appointment/GetAppointmentByID', config);
    return result;
  },
  /**
   * 删除预约设置
   *
   * @param {*} [params={}]
   * @param {*} config
   * @returns
   */
  async deleteAppointmentItem(params = {}, config = {}) {
    config.params = params;
    let result = await Vue.http.delete('/Appointment/DeleteAppointment', config);
    return result;
  },
  /**
   * 根据医师编号、医院编号获取30天内的预约设置列表
   *
   * @param {*} [params={}]
   * @param {*} config
   * @returns
   */
  async getAppointmentListByDoctorAndHospital(params = {}, config = {}) {
    config.params = params;
    let result = await Vue.http.get('/Appointment/GetAppointmentListByDoctorAndHospital', config);
    return result;
  },
  /**
   * 分页获取预约设置列表
   * @param {*} params 
   * @param {*} config 
   */
  async getAppointmentList(params = {}, config = {}) {
    config.params = params;
    let result = await Vue.http.get('/Appointment/GetAppointmentList', config);
    return result;
  }
}
